var obj = {
  name: "obj",
  foo: function () {
    console.log(this);
  },
};
obj.foo();
var f = new obj.foo();
